package edu.wpi.first.wpilibj.templates.subsystems;
import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.templates.RobotMap;
import edu.wpi.first.wpilibj.*;


/**
 *
 * @author Eric
 */
public class DriveSystem extends Subsystem {
    
    Victor motorL;
    Victor motorR;
    boolean disabled;
    double[] Speed;
    
    public void DriveSystem(){
        motorL = new Victor(RobotMap.leftdrive);
        motorR = new Victor(RobotMap.rightdrive);
        disabled = true;
        Speed = new double[2];
        Speed[0] = 0;
        Speed[1] = 0;
        motorL.set(Speed[0]);
        motorR.set(Speed[1]);
    }

    public void initDefaultCommand() {
    }
    
    public void speedSet( double leftSpeed, double rightSpeed) {
        Speed[0] = leftSpeed;
        Speed[1] = rightSpeed;
        motorL.set(Speed[0]);
        motorR.set(Speed[1]);
    }
    public void speedSet( double[] input){
        Speed = input;
        
        motorL.set(input[0]);
        motorR.set(input[1]);
    }
    
    public void disableDrive( boolean Set){
        disabled = Set;
        this.speedSet( 0.0, 0.0);
    }
}
